package org.luxor.commons.websocket.annotation;

import javax.websocket.ClientEndpointConfig;
import javax.websocket.Decoder;
import javax.websocket.Encoder;
import java.lang.annotation.*;

/**
 * WebSocketClient
 * <p>
 * 等同于 @ClientEndpoint
 *
 * @author Mr.yan  @date 2021/8/6
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface WebSocketClient {

    /**
     * websocket地址
     * 例如: "ws://localhost:80/websocket"
     */
    String value();

    String[] subprotocols() default {};

    Class<? extends Decoder>[] decoders() default {};

    Class<? extends Encoder>[] encoders() default {};

    Class<? extends ClientEndpointConfig.Configurator> configurator() default ClientEndpointConfig.Configurator.class;

}
